package com.ss.android.article.base.feature.user.location;

import android.content.Context;
import android.content.Intent;
import android.widget.ListView;

import com.ss.android.article.browser.R;
import com.ss.android.common.util.ToolUtils;
import com.ss.android.newmedia.activity.FragmentActivity;
import java.util.List;

public class AreaSelectedActivity extends FragmentActivity {
    private List a;
    private ListView b;
    private a c;
    private com.ss.android.article.base.feature.user.location.a.a$a d;

    public AreaSelectedActivity() {

        this.d = new com.ss.android.article.base.feature.user.location.a.a$a(this);
    }

    public int getLayout() {
        return R.layout.a4;
    }

    public void init() {
        super.init();
        this.b = (ListView) this.findViewById(R.id.hu);
        this.c = new a();
        this.c.b = this.d;
        this.b.setAdapter(this.c);
        if(this.getIntent() != null) {
            this.a = this.getIntent().getStringArrayListExtra("area_list");
            this.mTitleView.setText(this.getIntent().getStringExtra("province"));
        }
        a v0 = this.c;
        v0.a = this.a;
        v0.notifyDataSetChanged();
    }

    public void onBackPressed() {
        if(!this.isFinishing()) {
            Intent v0 = null;
            if(this.isTaskRoot()) {
                v0 = ToolUtils.getLaunchIntentForPackage(((Context)this), this.getPackageName());
            }
            this.finish();
            if(v0 == null) {
                return;
            }
            this.startActivity(v0);
        }
    }
}

